/*
 *  CS202 - Spring 2009">
 *  Professor: Dr. Michael Peterson">
 *  Student: Deylo Woo (dwoo711@gmail.com) ">
 */
package project_3_v_2;

import java.awt.*;

/**
 * It creates the circle red explosion class
 */
public class Explosion extends MovingObject {

    private int _timer;

    /**
     * Only constructor
     * @param xCoord: x coordinate on panel where explosion will show
     * @param yCoord: y coordinate on panel where explosion will show
     * @param height: height of explosion is this case diameter
     * @param width: width of explosion in this case diameter 
     * @param rise: represent the velocity of object moving upwards
     * @param ru; represent the velocity of object moving horizontaly
     * @param color: color of object created
     */
    public Explosion(int xCoord, int yCoord, int height, int width, int rise, int run, Color color) {
        super(xCoord, yCoord, height, width, rise, run, color);

        _timer = 200;
    }

    /**
     * This method paints the object on panel
     * @param g: the graphice to be painted
     */
    @Override
    public void paint(Graphics g) {
        g.setColor(_color);
        g.fillOval((_xCoord-(_width/2)),( _yCoord-(_height/2)), _width, _height);
    }

    /**
     * @return the _timer
     */
    public int getTimer() {
        return _timer;
    }

    /**
     * @param timer the _timer to set
     */
    public void setTimer(int timer) {
        this._timer = timer;
    }
}
